<%--
 *  File:    MonthlyDataFileReport.jsp
 *  @Author: KevinFan
 *  Date:    2011-07-20
 *
 *  Copyright (C) 2000 - 2012 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.OvalLabel" %>
<%@ page import="com.oval.util.OvalCustomMessage" %>
<%@ page import="com.oval.util.OvalCustomColumn" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  //init param
  Category cat = Category.getInstance("jsp.MonthlyDataFileReport");
  String strModuleName = "CM";
  String privilegeCode = "R60010"; 
%>

<%@ include file="/inc/PageDefault.inc" %>
<%@include file="/inc/Print.inc"%>

<html>
<head>
<title>ProdSummary</title>
<PageFlow:CheckPageFlow pageName="p_monthsdatafile"/>
<%Vector summary = (Vector)pageContext.getAttribute("monthsresult");%>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link rel="stylesheet" href="../css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="../css/cn/script.js"></script>
<script language="JavaScript" src="../js/FuncLib.js"></script>
<%@ include file="/inc/SummaryDivision.inc" %>

<script>
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
  <form name="prodsummaryform" method="post" action="../../Dispatcher" target="_self">
      <input type="hidden" name="pagename" value="p_monthsdatafile">
      <input type="hidden" name="actionname">
  <tr>
    <td>
      <table width="2000" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">

        <tr class="deepblue-left">
          <td width="80" align="center" style="font-size:14px;font-weight:bold;"><%= label.getLabelName("L_CustomerCode") %></td>
          <td width="100" align="center" style="font-size:14px;font-weight:bold;"><%= label.getLabelName("L_CostomerName") %></td>
          <%
          	for(int j=1;j<=12;j++){
          %>
          <td width="20" align="center" style="font-size:14px;font-weight:bold;">
			<%=j %>
		  </td>
          <%} %>
		  <td width="100" align="center" style="font-size:14px;font-weight:bold;">大区</td>
		  <td width="100" align="center" style="font-size:14px;font-weight:bold;">省办</td>
		  <td width="100" align="center" style="font-size:14px;font-weight:bold;">业务区域</td>
		  <td width="100" align="center" style="font-size:14px;font-weight:bold;">员工</td>
		  <td width="100" align="center" style="font-size:14px;font-weight:bold;">职称</td>
		  <td width="100" align="center" style="font-size:14px;font-weight:bold;">上级员工</td>		  
		  <td width="100" align="center" style="font-size:14px;font-weight:bold;">产品组</td>		  
		  <td width="100" align="center" style="font-size:14px;font-weight:bold;">经销商级别</td>
		  <td width="100" align="center" style="font-size:14px;font-weight:bold;">普药商业级别</td>
         </tr>
		 <%
          	String strClassType = "";
	        String orgcode = "";
	        String orgname = "";
			int i = 0;
			Integer m = null;
			String str = "";
           %>
          <logic:iterate id="onerow" collection="<%= summary %>">
		   <%
	            if(i%2 == 1)
	            {
	              strClassType = "td-listrom";
	            }else{
	              strClassType = "none";
	            }
	            orgcode = (String)((HashMap)pageContext.getAttribute("onerow")).get("orgcode");
	            orgname = (String)((HashMap)pageContext.getAttribute("onerow")).get("orgname");
				i++;
           %>
          <tr class="<%=strClassType %>">
            <td style="font-size:14px;">
            	&nbsp;<%= orgcode %>
            </td>
            <td style="font-size:14px;">
            	&nbsp;<%= orgname %>
            </td>
			<%
          	for(int j=1;j<=12;j++){
			str = "m"+j;
			%>
			<td style="font-size:14px;">
            	<%m=(Integer)((HashMap)pageContext.getAttribute("onerow")).get(str);%>
				<%if(m!=null){
				if(m.intValue()>0){%>
				<font color="green">√</font>
				<%}else{%>
				<font color="red">╳</font>
				<%}}else{%>
				<font color="red">╳</font>
				<%}%>
            </td>
			<%} %>
			<td style="font-size:14px;">
            	<custom:write name="onerow" property="area1name" nbsp="true"/>
            </td>
			<td style="font-size:14px;">
            	<custom:write name="onerow" property="area2name" nbsp="true"/>
            </td>
			<td style="font-size:14px;">
            	<custom:write name="onerow" property="area3name" nbsp="true"/>
            </td>
			<td style="font-size:14px;">
            	<custom:write name="onerow" property="salesrepname" nbsp="true"/>
            </td>
			<td style="font-size:14px;">
            	<custom:write name="onerow" property="salesrepreproletype" nbsp="true"/>
            </td>
			<td style="font-size:14px;">
            	<custom:write name="onerow" property="parentsalesrepname" nbsp="true"/>
            </td>
			<td style="font-size:14px;">
            	<custom:write name="onerow" property="productgroupname" nbsp="true"/>
            </td>
			<td style="font-size:14px;">
            	<custom:write name="onerow" property="organalysisattr1" nbsp="true"/>
            </td>
			<td style="font-size:14px;">
            	<custom:write name="onerow" property="organalysisattr2" nbsp="true"/>
            </td>
          </tr>
		  </logic:iterate>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="summary_top" ></td>
        </tr>
      </table>
    </td>
  </tr>
 </form>
</table>

</body>
</html>


